package com.wework.api;

import static io.restassured.RestAssured.given;

public class TokenHelper {

    public static String getAccessToken(){
        String accessToken=given().log().all()
                .when()
                .param("corpid","wwb7119bc731b21310")
                .param("corpsecret","4n4LsFCptLB0BpN2ar2O_yoQRQHOSFKvfsqKxHsN7N4")
                .get("https://qyapi.weixin.qq.com/cgi-bin/gettoken")
                .then().log().all()
                .extract().response().path("access_token");
        return accessToken;
    }
}
